Contents

Welcome to the Mellosoftron Help system!

IMPORTANT: If you are running the Mellosoftron for the first time, please go through the Setup guide before proceeding. If you don't, the Mellosoftron may work badly or not at all on your system.

What is it - and why the name?

What's new in this version?

How to use it

•	Playing

•	Editing

How to REGISTER

How to get more sounds

License information

Contacting the author (Tommy.Anderberg@abc.se)


What it is
The Mellosoftron turns your Windows 95 PC into a real time, programmable sampler which can be played live using the computer keyboard, the mouse or an external MIDI keyboard - even if you don't have a wavetable card! Any cheap sound card capable of playing stereo, 16 bit digital audio at a rate of 22050 Hz or higher will do.

Since it uses the same file formats (PRGs and WAVs) as WAVmaker and the MIDInight Express, the Mellosoftron can also serve as a fast patch design system for the growing family of WAVmaker software.


Why the name?

The Mellosoftron's name is a tribute to the grandfather of all samplers, the Mellotron.

This venerable ancestor was an electro-mechanical marvel. For each key on the console there was a magnetic tape player. When a key was pressed, the tape started rolling. Upon key release, a spring yanked the tape back (faster than a regular, motor-driven rewind, but still too slow for fast solo playing). Each tape contained a separate, 8-second sample - they had to be that long since no looping was possible with this approach.

The tapes came in racks which could be replaced to change "patch". Unfortunately, every time you did this, you were likely to also have to realign the tape player heads. For live performances, the Mellotron was therefore in practice a mono-timbral machine.

In spite of these limitations, the Mellotron's polyphony made it a succes. It was the first keyboard capable of producing complicated chords with realistic-sounding ensemble instruments, in an age when electronic synthesizers where essentially monophonic beasts and digital samplers were unheard of. It was eventually pushed out of the market with the advent of electronic machines such as the ARP String Ensamble.

If you want to hear a Mellotron in action, listen to the chords in Jean Michel Jarre's first LPs, Oxygene (1976) and Equinoxe (1977).

The Mellosoftron can do a whole lot more than the old Mellotron - in fact, it could easily emulate one, given enough RAM - but on a slow PC it shares the latency problem which made its electro-machanical ancestor unsuitable for fast solos. Echoes of the past?


What's new in this version?
•	You can now select the MIDI input device (click the Port button in the I/O Control window).

•	The Mellosoftron now remembers your MIDI channel selections between sessions.

•	A WAV directory browser has been added to PRG Edit.

•	PRG Edit also has a new "Last sample in WAV" button.

•	WAView sports new fast-scroll buttons taking you to start and end of the sample file.

•	Opening WAView no longer disables MIDI input. Keep playing while admiring those waveforms!

•	Alphanumeric keyboard autorepeat is now automatically disabled in the main window.

•	The Mellosoftron now tries to talk Windows 95 into granting it HIGH_PROCESS_PRIORITY. This gives it a larger CPU time share if you are running it concurrently with other programs. Of course, shutting down those other programs remains the best course of action!

•	Αll bugs known to date (error recovery code, essentially) have been fixed.


Playing

Before you can do any playing, you must load a PRG (patch file). This is done by clicking the Load PRG button, selecting a file in the PRG file dialog, and clicking the Open button. When the PRG has been loaded, its name is displayed in the main window's status bar.

You may also want to bring up the I/O Control window in order to change the Play mode.

There are three ways to actually play the Mellosoftron:

•	With a MIDI keyboard (or, more generally, with a MIDI controller) hooked up to your PC's MIDI In port.

•	With the mouse.

•	With the alphanumeric keyboard.

One doesn't exclude the other - you can use all three at the same time, if you want to. I find it practical to keep the Sliders window open and use the mouse there, while playing notes with my MIDI keyboard.

Note that mouse and alphanumeric input is always treated as coming from MIDI channel 1. If that channel is not selected, you won't be able to play the Mellosoftron using the mouse and the alphanumeric keyboard.

Also, don't leave more windows open than necessary. The more windows you have on screen (and the more buttons, sliders etc. those windows contain), the busier Windows (no pun intended) will be checking them all for input, reducing the time available for MIDI and audio processing. The I/O Control window (for one) is a real killer. I know it looks cool, but try not to bring it up unless you really need it (or unless you have a really fast CPU)!

Also keep in mind that other processes do't need to be visible on screen to steal time from the Mellosoftron. Some users have found that disabling their (inactive) screen savers can reduce latency by as much as 1/3!


Play modes

•	In Polyphonic mode, all keys you press are played. This is probably the mode you'll be using most of the time.

All other modes are monophonic, i.e. only one note can be played at a time.

•	In Legato mode, the last key you pressed keeps playing until you press a new one (key release is ignored until the next Note On event).

•	In Monophonic mode, all (other) keys are automatically released when there is a new Note On event. Note that this does NOT necessarily mean instantaneous silencing of all notes already playing; that is determined by the release envelope for the instrument you're using.

•	In Portamento mode, pressing a second key BEFORE releasing the previous one causes the pitch to be gradually changed to that of the new key (computed relative to the pitch and position of the previous one). The same PRG entry (WAV sample, envelope, performance parameters) remains in use, regardless of the assignments in the PRG (patch file), since this is the only way to ensure a smooth passage between notes. If all keys are released before a new one is pressed, the sample and pitch assigned to it by the PRG are used.

If the Constant time checkbox is checked, the passage from one key to another takes the same time no matter how far apart they are. If it's not checked, the pitch will change at a constant rate, i.e. the time used will be proportional to the separation between notes. Either way, the passage will be faster the further to the right you push the slider in the Play mode box.


MIDI keyboard
There is not much to say about using a MIDI keyboard. If your MIDI drivers have been set up correctly, it should work. Apart from Note On/Note Off events, the Mellosoftron will also read controller events (volume, pitch bend, modulation, pan position, pressure, expression).

Note: Some sound cards and/or drivers can't handle MIDI input and digital audio output at the same time. On such a system, the Mellosoftron will abort at startup, reporting a waveOut error.

 A good way to check that MIDI input is being received correctly (you will want to check this if you can't hear the expected output) is to bring up the Sliders window and see if the on-screen sliders track those on your external controller.

Note that the I/O Control window allows you to select which MIDI channels to receive and which to ignore (in the MIDI input box). Of course, if no MIDI input checkbox is checked, all MIDI input will be disabled. Mouse and alphanumeric input won't work either, since that's treated as if coming from MIDI channel 1!


Mouse
The Mellosoftron allows you to enter notes from a graphic, on-screen keyboard. Just click the Keyboard button in the main window to bring it up, and click the note you want to play using the Left mouse button. Sustained sounds will keep playing until you release the mouse button.

You can also bring up a window containing volume, pitch bend, modulation and pan position controls by clicking the Sliders button. (Personally, I like using this window for the sliders and an external MIDI keyboard for note input).

All controller and note events entered this way are treated as if coming from MIDI channel 1. If channel 1 has been disabled (using the I/O Control window) mouse (and alphanumeric keyboard) input won't work.


Alphanumeric note entry

When the main window is selected, you can enter notes from the alphanumeric keyboard.

The Track checkbox in the I/O Control window's Alfa box must be checked for this function to be enabled. Also checking the Show checkbox causes the notes being played to be displayed graphically in the Keyboard window (if open).

The attack velocity is taken from the Default velocity slider position in the I/O Control window. The release velocity is always 64.

All controller and note events entered this way are treated as if coming from MIDI channel 1. If channel 1 has been disabled (using the I/O Control window) alphanumeric keyboard (and mouse) input won't work.

The following keyboard map is used:


PRG Edit

PRG Edit is a dedicated editor for PRG files. While these can be modified using any text editor, they are NOT free format, so you should use PRG Edit with them unless you have a very good reason not to!

The best way to find out  the meaning of each data field on a PRG data line is to select it in the data display grid and read PRG Edit's Description, above the comment box (on the lower half of the panel).

Navigating the grid is simply a matter of using your mouse and keypad as you would with any spreadsheet program. The three large buttons placed above the Description line, marked Sample, Controller and Envelope, are a further navigational aid: clicking them scrolls the grid sideways to the first column of the respective data section.

When PRG Edit is first started up, the current PRG file is read from disk and put into an edit buffer. None of the changes made to the edit buffer are reflected in the file until you click the Save button. Clicking Reload (which causes the file to be re-read into the edit buffer) or Close without first saving causes all changes to be discarded, leaving the file untouched.

Click Apply to make the changes take effect in the sound engine.

One note about the Key range column is in place. Overlapping key ranges are not parsed exclusively, but inclusively, meaning that all patches (up to six) covering a key are actually used when that key is played. In other words, you can assign up to six independent patches (sample files and parameters) to each key; when the key is "pressed", they are all played in unison. This makes it easy to build complex instruments by combining several patches reacting differently to controller events (e.g. velocity and pressure).

It's also worth knowing that in a PRG file, lines starting with a # are comments. PRG Edit displays them separately from the actual data, in the comment box. Data lines preceded by comments are marked with a # in the second non-scrolling column of the data display grid.

Editing comments is simply a matter of selecting a line in the data display and typing away in the comment box.

Note that the selected data display line is marked by a pointed bracket (>) in the first non-scrolling column of the data display grid.

The controls above the data display grid perform the following functions:

•	Insert creates (and selects) a new data line in the grid, ABOVE the currently selected line, copying all its contents.

•	Add creates (and selects) a new data line in the grid, BELOW the currently selected line, copying all its contents.

•	Delete discards the currently selected line from the grid, and selects the next line (the previous one at the bottom of he grid). PRG Edit does not allow you to delete all lines in the grid; there must always be at least one data line.

•	Copy to... copies the value in the currently selected data grid field to the rest of the column, according to the criterium chosen with the radio button selectors Same base key, Same key and All.

•	Browse WAVs allows you to select a sample file from your current WAV directory. While the directory window is open, this button carries the label Import filename. Activate it by selecting a filename in the directory listing and a cell in the WAV column of the PRG data display grid. Clicking it causes the selected filename to be imported into the data display grid.

•	View sample opens a modeless WAView window on the sample file referred to by the currently selected PRG line, allowing you to switch freely between WAView and PRG Edit.

While the WAView window is open, this button carries the label Import value.

Clicking Import value while the  Start sample or Loop start sample fields are selected in the data display grid causes the value in the Start edit box of the WAView window to be copied into the grid (after a unit conversion, if needed).

When the End Sample and Loop end sample fields are selected in the grid, the effect depends on the current state of the WAView window. If there is a selected range, the End value is imported. If there is no selected range, the Start value is imported.

If a length field (Attack length or Decay length) is selected in the data display grid, clicking Import value causes the difference between the End and Start values in the WAView window to be imported. Note that PRG Edit uses integer length values. All decimals will be rounded off.

•	The last button above the data display grid is enabled when a cell in the Start sample, End Sample, Loop start sample or Loop end sample column of the data display grid is selected. Clicking it causes the end sample position of the sample file to be imported into the selected cell.

Click here for an example of how to create a new PRG file!


How to create a PRG file

The best starting point for the creation of a new PRG file is another PRG file, preferably one using the same keyboard mapping.

Most PRGs in WAVmaker's GM sample library use sample files recorded at f3, f4, f5, f#3, f#4, f#5, and often also at f6 and f#6. Upon MID to WAV rendering, all other notes are obtained from these by resampling. The reason for having two adjacent base notes for each sampled octave is essentially mathematical: with WAVmaker, resampling by harmonic ratios (such as f to g or f# to g#) is much faster (for the same resulting sound quality) than resampling by inharmonic ratios (such as f to g# or f# to g). For even higher quality, you can use the mapping employed for WAVmaker's acoustic pianos: in this case, the full octave is obtained from d, d#, g# and a, by moving one note up or down from the appropriate base note. If speed is paramount, you may want to try a few other mappings. Within the octave, the fastest interval is five semitones (as in f to a#). Resampling by a full octave is even faster - and needless to say, if you sample all notes you're going to need, there will be no need for any resampling at all! This is the usual situation when dealing with percussion sounds.

The most important message here is that you're not limited to any particular keyboard mapping. You can choose to work "MOD-style" if you wish, i.e. sample just one note, like c4, and derive all other notes from it. This only takes one data line, in which you declare the Key range to be g10-c0 (more generally, remember that contiguous ranges sharing the same base key and other parameters need not be described key by key). If you only have a limited set of samples at your disposal, you may have to adapt the keyboard mapping accordingly.

Of course, most instruments (especially acoustic ones) do not only vary in pitch but also in timbre (i.e. in waveshape) when played at different notes (just think of an acoustic piano, played at opposite ends of the keyboard) . In order to reproduce this kind of behaviour, you'll need to spread out your base keys over a suitable range.

Anyway, in this example we're going to use a "trivial" mapping, i.e. just one base note from which all others are derived. Our template will be the 96.PRG contained in the Mellosoftron Evaluation Package and in the Compact GM Library,  the same you may have used while setting up the Mellosoftron. (What? You mean you haven't gone through the setup instructions yet? Please do so before proceeding!)

Step 1:	In the Mellosoftron's PRG directory, copy 96.PRG to an unused filename, e.g. 0.PRG.

You can use the Windows Explorer, WAVmaker's Copy button or a third party file manager to do this.

Step 2:	Load the new PRG (click the Load PRG button in the Mellosoftron's main window, select the file and click Open).

Step 3:	Click the Edit PRG button in the Mellosoftron's main window.

This causes the currently loaded PRG to be read into the edit buffer, and the PRG Edit window to be opened.

Step 4:	Edit the comment field.

Before we do anything else, we should add a leading comment field. This way, there will be no risk of confusion when we return to the file later.

When the PRG editor starts up, the first data line is automatically selected. The leading comment, i.e. the comment preceding the first data line, is therefore already displayed (if there is any) and ready to be edited in the comment box (below the field Description line).

The comment box is actually a simple text editor. Click it and enter a suitable blurb, such as

#---------------#

# My first PRG! #

#---------------#

#

The leading #s are mandatory. If you omit them, they will be inserted by the PRG editor when you save your new PRG. The trailing #s are just for looks, and may be left out.

Step 5: Change sample file(s).

Depending on our goals and on the file at hand, this is a step which may be better tackled using a text editor. Remember, PRG files are just structured text files, so they can be edited that way too.

Suppose that you have a PRG containing a large number of references to different WAV files. The 6.PRG (Harpsichord) contained in WAVmaker's GM library, for instance, refers to WAV files called GM6F3, GM6F#3, and so on. If you want to change those references to the string sample files GM48F3, GM48F#3 etcetera, you can use just about any text editor to do a global search-and-replace from GM6 to GM48 with only a couple of keystrokes. This is also worth keeping in mind when doing other large-scale PRG editing.

On the other hand, the dedicated PRG editor can do some things which a text editor can't, since it knows the meaning of the data. The Copy to... button can be used to perform selective copy operations to data lines sharing the Same base key or the Same key (useful with layered sounds). It can also do a global copy (check the All radio button).

In the case at hand (assuming that you are using a copy of the 96.PRG which came with the Mellosoftron) there is only one data line in the file.  All you have to do is therefore to click the entry in the WAV file column and type the name of a file in the current WAV directory. For this example, I suggest that you type GM97D6. The WAV extension is always implied - don't add it!

Step 6: Kill the old loop point settings.

96.PRG employs looping to allow sustained playing of arbitrary duration. Now that we're using a different sample file, the old loop is no longer any good.

When dealing with multiple-line PRGs, I find it useful to remove old loop point settings before I start looking for new ones - if I don't, I may easily forget to update all entries, leaving some of the old settings in place. With a one-line PRG, this is not all that important, except as a way to start a good habit! Scroll the data display grid sideways until you can see the Loop start sample entry and change it to -1 (meaning no loop point). Note that the Loop end sample value for f3 is automatically changed to -1, too (an end point doesn't make much sense without a start point).

If you were dealing with a multiple-line PRG, you would now use the Copy to... button to apply the same changes throughout the edit buffer.

WARNING: If you save a PRG with some strange loop point settings, like -1 and 40703 (i.e. no start point but an end point) you'll have to fix the PRG with a text editor. The Mellosoftron will refuse to let you load a file containing obvious nonsense! This may all seem unnecessarily harsh, but it actually makes it much easier to spot errors and to avoid wasting hours of rendering time with WAVmaker due to bad PRGs.

 Step 7: Find new loop points.

As anybody who's ever been involved with sampling will tell you, this can be a most frustrating task. You need to find two samples with similar (ideally, identical) values, separated in time by a multiple of the sound's wavelength. Since any reasonably interesting sample file will feature large envelope and timbre variations over time, you'll be tempted to use "tight" looping, i.e. to constrain the loop to a small region within which it's relatively easy to find corresponding samples - but if you do this, you'll suppress exactly those variations which make the sound interesting! You may get away with tight looping when the loop is used to extend a low-volume release section, but in most cases, you'll use looping for the sustain section, which is central to how the sound is perceived.

Your best tool in this game is WAView and its scaling/zooming controls. Here's what I do in a typical looping session:

•	Step 7.1: 	Select the Loop start sample entry for the base key (the only one in a one-line PRG).

•	Step 7.2: 	Click the View sample button to open a WAView window.

•	Step 7.3: 	Change the horizontal Zoom value in WAView to 1.0. This is useful for getting a first impression of the envelope and for identifying promising loop sections.

•	Step 7.4: 	Try marking various Start positions and use the crosshair to find one yielding a good fit to the amplitude at the corresponding (candidate) End position.

•	Step 7.5: 	When there is a good candidate loop section, select it.

•	Step 7.6: 	Transfer the Start and End sample positions from WAView to the PRG Edit window by selecting the Loop start sample entry, clicking the Import value button, selecting the Loop end sample entry, and clicking the Import value button again.

•	Step 7.7: 	Click the Start button in WAView, so as to center the graphic display on the start sample.

•	Step 7.8: 	Successively zoom in on the WAV while looking for a good loop start position. Some people will tell you that zero crossings are good loop points, but peaks and valleys are often better, since they are (near) zero-slope points, i.e. the waveshape is only changing slowly there. As a consequence, you're more likely to find at least one good fit at the opposite end of the loop section if you use peaks and valleys.

•	Step 7.9: 	Mark the final (hopefully!) start point, making sure to align the horizontal line of the cross-hair with the sample value (the vertical position in the graph).

•	Step 7.10: 	Click the End button in WAView, so as to center the graphic display on the end sample.

•	Step 7.11:	Try finding the best fit to the Start sample. Move the end of the selected range there.

•	Step 7.12:	Repeat Step 7.6 (i.e. transfer the Start and End sample positions from WAView to the PRG Edit window).

•	Step 7.13: 	In the PRG Edit window, click the Apply button to make the changes take effect in the sound engine, and try playing the base note. Remember to use sufficiently long durations, so you get to hear the loop a few times over.

•	Step 7.14:	Sounds bad? Go back to Step 7.10, 7.7 or even 7.3, depending on how hopeless it sounds and on how many minor modifications you've already tried.

•	Step 7.15:	[Multi-line PRGs only] When it finally sounds OK, use the Copy to... button to update all Loop start sample and Loop end sample entries for the Same base key.

•	Step 7.16:	[Multi-line PRGs only] Make sure that the End sample values for the modified lines are equal to or larger than the corresponding Loop end sample values.

•	Step 7.17:	Check that the loop also sounds right for the resampled notes. If it doesn't, go to Step 7.14 (you didn't really think that you were done, now did you?). Alternatively, you may want to supply different loop points for some notes, possibly turning a one-line PRG into a multiple-line one.

•	Step 7.18:	Click the Save button in the PRG Edit window in order to save the new PRG (the file is not saved if you exit using the Cancel button).

If you think that this is a lot of work, imagine what it was like to create the full GM library! Anyway, try looping GM97D6. When you get too sick of it all, you can look at 97.PRG for my suggestion.

Cheer up, though. After all, not all sounds need to be looped!

Step 8: Edit the other performance parameters.

There are quite a few of them, and I won't go through them all in detail. You can find out what they do by selecting them and reading PRG Edit's Description line. Experiment a bit if it still isn't clear to you. A few highlights:

•	Raise the Base volume (the volume at which you want WAVmaker to believe that the sound was recorded) in order to have it play back (render) at a lower volume.

•	Raise the Base pan (the stereo pan position at which you want WAVmaker to believe that the sound was recorded) in order to have it play back (render) further to the left.

•	Set the Start sample to a value larger than zero if you want to skip a leading section of the WAV file.

•	The End sample can be used to limit the max duration of un-looped sounds. If the sound is looped, End sample must be equal to or larger than Loop end sample.

•	Use the Attack, Decay, Sustain slope, Release slope, Attack length and Decay length fields to modify the envelope shape. These should all be fairly intuitive.


WAView

The WAView window is opened from  PRG Edit by clicking the View sample button. It's a modeless window, so you can switch freely between WAView and PRG Edit.

WAView's graphic display is politically correct: the left channel is drawn in red and the right channel is drawn in blue.

In order to scroll the graphic display over the length of the sample file, you can use the VCR-style buttons below the position gauge: the single arrow buttons scroll the display by one frame; the double arrow buttons by 10% of the file size. Above the VCR buttons (immediately below the position gauge) there are two buttons which bring you to the first and the last sample position, respectively. You can also center the display on the position shown in the Start and End edit boxes by clicking the corresponding buttons.

The frame size can be changed using the horizontal Zoom edit box. A zoom value of 1.0 will cause the whole file to be displayed. You can also edit the vertical zoom factor, in the upper right corner box (where you can also read off the vertical graphic cursor position). The original settings can be restored by clicking the Reset button. Note that this button becomes a Stop button during redraw, allowing you to abort it at any time.

In order to mark a position in the graphic display, simply click there. This will cause several things to happen:

•	A cross-hair will appear, originating at the selected position. The horizontal line is especially useful when looking for loop points of equal amplitude, to be used in PRG Edit.

•	The graphic cursor changes from a cross to a horizontal, bidirectional arrow (a "resize" cursor).

•	The End button is activated, and the current (horizontal) graphic cursor position is now reflected in the End edit box.

•	The contents of the Start edit box are frozen, reflecting the horizontal position of the cross-hair. You can reposition the cross-hair by editing the value in this edit box, and force the display to be centered on it by clicking the Start button.

Now you can do one of two things:

•	In order to remove the cross-hair, click the mouse in a position preceding it, anywhere in the graphic display. Clicking the Reset button will also remove the cross-hair.

•	In order to select a range, click the mouse in a position subsequent to the cross-hair, anywhere in the graphic display.

When you select a range

•	The background color in the graphic display, from the cross-hair to the selected end position, is changed to Aqua.

•	The graphic cursor changes from a bidirectional arrow to a standard Windows arrow.

•	The contents of the End edit box are frozen, reflecting the horizontal end position of the selected range. You can resize the range by editing the value in this edit box, and force the display to be centered on it by clicking the End button.

•	The Zoom button is activated. Clicking it will cause the graphic display to be fitted exactly to the selected range. Note that the Reset button becomes a Stop button during redraw, allowing you to abort it at any time.

•	The Play selected button is activated. Clicking this button will cause the selected range to be played back on your sound card. Note that the button becomes a Stop button during playback.

In order to deselect a range, click anywhere in the graphic display (or click the Reset button).

The Play shown and Play all buttons are available at all times. Clicking them will cause the portion of the file shown in the graphic display and the whole file to be played back, respectively. Note that the buttons become Stop buttons during playback.

In order to close the WAView window, hit the OK button.


On PRGs and WAVs

The Mellosoftron needs two kinds of files to do its job, PRGs and WAVs:

•	PRG files contain instrument definitions (patches).

Following the WAVmaker convention, each PRG file corresponds to (and is named after) a MIDI program (instrument). WAVmaker and the MIDInight Express expect to find the information needed to handle MIDI program 0 (Piano 1) in 0.PRG; MIDI program 6 (Harpsichord) is described by 6.PRG; and so on. Drum sets have their program number preceded by a "D", as in D0.PRG (Standard Set). In order to ensure compatibility with WAVmaker and the MIDInight Express, the Mellosoftron expects you to follow this naming convention. You may of course put anything you like in a PRG called 0.PRG, even if it bears no resemblance whatsoever to a piano; but you can not call it Piano.PRG. If 128 PRGs are not enough for you (256 if you use the "D" prefix) you can use multiple directories to organize your pathes in banks (see below).

PRGs do not contain any sound data; the actual samples are kept in WAV files. PRGs assign sample files to keys (notes) and impose performance parameters (base volume and pan position, controller sensitivities, envelope shape, loop points...). Each key on the 128-note "keyboard" described by the PRG file can be assigned its own individual sample file(s) and performance parameters.

While you can use any text editor to create and modify PRG files, I strongly recommend using WAVmaker's or the Mellosoftron's dedicated PRG editor for this task!

WAVmaker and the MIDInight Express want all PRGs needed to play a MID to reside in a common directory, so it's a good idea to organize your PRGs in "banks", with each bank corresponding to a separate directory. Click the button labeled PRGs in order to change the current PRG directory.

•	WAV files contain the actual sound data (samples) referred to by PRG instrument definitions.

All WAVs referred to by a PRG must reside in a common directory. Click the button labeled WAVs in order to select a new WAV directory.


Setup guide

Don't worry, setting up the Mellosoftron is easy. If you have installed it correctly (i.e. using INSTALL.EXE), there is only one parameter to adjust - but it's a fundamental one!

Please follow these steps:

1)	If you haven't already launched the Mellosoftron, please do so now. For optimal results, I strongly suggest that you shut down any other application which may be currently running. Note: screen savers are bad for you! Some users have been able to improve Mellosoftron performance simply by disabling their screen savers. There may also be some other CPU-hungry background tasks on your system which you could live without.

2)	When presented with the Load PRG dialog, select file number 96 and click Open. This will cause the Mellosoftron to load the patch file 96.PRG. I'm assuming that you have installed the full Evaluation Package, demo files included. If not, you can use e.g. 48.PRG (from the WAVmaker Evaluation Package - make sure you have expanded the necessary WAVs!) or 49.PRG (from the MIDInight Express 1.2 or later). Any sustained sound will do; these are just suggestions!

3)	If you don't have an external MIDI keyboard hooked up to your PC's MIDI In port, bring up the on-screen keyboard (this is done by clicking the Keyboard button in the main window). Close any other Mellosoftron subwindow (NOT the main window!) which may be currently open.

4)	Either using an external MIDI keyboard or the Left mouse button in the Keyboard window, play a sustained note (keep the key or mouse button pressed).

Now, one of three things can happen:

•	Nothing at all - no sound.

•	You hear a note, but it's hacked up, stuttering.

•	Everything sounds OK.

5)	Release the key (or mouse button).

6)	Assuming that you heard SOMETHING, either hacked up or not, bring up the I/O Control window (this is done by clicking the I/O Control button in the main window). In the lower right corner of the I/O Control window, you should see a box labeled Latency. This is the parameter which you are about to tweak - for an optional explanation of what it actually does, click here.

7)	If the sound was OK, your goal is to lower the value of the Latency parameter as much as it will go without the sound breaking up. If the sound was not OK, your goal is to raise the value of the Latency parameter until you get smooth, continuous output, but not one step further! A lower Latency value means a shorter time between events (e.g. a key being pressed) and audible responses, so try to find the minimal value compatible with your system. The faster your PC and sound card drivers, the lower the minimum Latency. The lowest allowed value is 2. On a 486DX66 you may be able to get as low as 4, but this varies widely depending on bus, drivers, background tasks etc.

That's all!


About the Latency parameter

Windows offers several ways of outputting digital audio, but only one (apart from the new DirectSound API, which has problems of its own) is useful for applications which, like the Mellosoftron, must be able to keep a sustained sound stream going for an arbitrary amount of time: the low-level waveOut functions.

waveOut works with buffers. The application is required to fill a memory buffer with sound data and then send it to waveOut for playback. When waveOut is done, it returns the buffer to the application.

If the application were to wait for the buffer to be returned before again filling it with sound data and sending it back to waveOut, there would be audible gaps in the output. The trick is therefore to start filling a new buffer while the first one is being played, and toggle between the two.

This "rotating buffer" scheme works fine most of the time, but can easily be disrupted when the CPU load varies a lot, either due to other processes running at the same time or because of variations in how much is being asked of the sound engine. The best solution is to use more buffers, and feed them into a playback queue. This way, variations in the CPU load cause the queue to become shorter or longer, but (hopefully) only rarely to reach zero length (in which case the sound breaks up). Alternatively, you may make the buffers longer, but that will also result in longer breakups when those do occur (since it takes longer to fill the next buffer to be played). In the MIDInight Express, this effect is actually strived for, since it makes a song more bearable when it's breaking up (each buffer contains no less than 4 seconds' worth of sound). Longer buffers also result in less CPU overhead per buffer (sending a buffer to waveOut every 4 seconds is less demanding than doing so every tenth of a second).

In the Mellosoftron, a 4 second delay between a controller event (e.g. a key being pressed) and actual sound output would be unacceptable, so the buffers are much shorter. Each one contains only 12 milliseconds' worth of sound data. On a blazingly fast PC with blazingly fast sound card drivers and nothing else to do, you can use just two buffers, resulting in a max delay of 12 ms between event and sound output. This is less than the human perception limit, so to a listener the response would appear to be instantaneous. For most instruments, the attack section is much longer than this, and longer reaction times will do. The most demanding cases are percussion and fast solo pieces, the least demanding ones are pad and ensemble backgrounds (click here for a historical parallell).

Now you know all you need to understand the Latency parameter: it's simply the number of buffers in use. It can go as low as 2 and as high as 100. More buffers yield slower response but they also make breakups more unlikely. The ideal setting is as low as you can go with the sound still holding together.


Why not DirectSound?

If you're wondering why the Mellosoftron doesn't use the new DirectSound API, which is supposed to provide low-latency sound under Windows 95 and NT 4, the answer is:

The low latency feature is only really there for static sounds, i.e. sounds stored in their entirety in memory buffers and blitted out on demand. In order to use such buffers, you must give up envelope shaping and looping (except for the trivial case of repeated playback of the entire buffer). You must also give up decent resampling, since all that DirectSound does is change the output rate (no interpolation). The resulting sound quality is horrible, totally unsuitable for music.

The last problem could be overcome (given enough RAM) by pre-resampling the sounds and storing them separately for each note, resulting in something very similar to the old Mellotron, but this is hardly worthy of being called a "solution".

If you want to do envelope shaping and decent resampling with DirectSound, you must use streaming buffers. A look at the documentation shows that you must then write ahead by at least 1 second in order to avoid breakups. Needless to say, a latency of 1 second is quite unacceptable for live applications.

Finally, most users don't have DirectSound drivers installed yet, so it would be necessary to bundle a DirectSound installer and drivers for at least the most popular sound card with the Mellosoftron, making the archive ridiculously large.


No sound?

If you can't hear a thing, there are only three real possibilities:

•	A really silly mistake, like leaving the sound card's digital audio volume set to zero. Use the standard Windows multimedia controls to check (and possibly correct) this. Also, remember to check that your MIDI keyboard (if you're using one) is properly connected, and that it's sending on a MIDI channel selected in the Mellosoftron's I/O Control window. Note in particular that mouse and alphanumeric input is always treated as coming from MIDI channel 1. If channel 1 is not selected, you won't be able to play the Mellosoftron using the mouse and the alphanumeric keyboard.

•	Your sound card is not properly installed to work under Windows. The Mellosoftron does not access the card directly; instead, it receives MIDI data and sends digital audio through the Windows low-level sound API (NOT the MCI mostly used for simpler tasks - the Mellosoftron only employs the MCI for sample playback from the WAView subwindow), which requires a set of drivers (provided by the card manufacturer) to have been installed and set up correctly. Refer to your Windows and sound card documentation for details.

Note that one way to check whether MIDI input is being read correctly, meaning that the problem is on the sound output side, is to bring up the Sliders window and see if the on-screen controllers track those on your external MIDI keyboard; you can also play the Mellosoftron independently of the MIDI port, using the on-screen Keyboard or your computer's alphanumeric keyboard - but remember that MIDI channel 1 must be enabled for this to work!.

•	Your sound card can't handle digital audio data of the kind produced by the Mellosoftron (16 bit stereo, 22050 Hz). The SB Pro, for instance, can only play 8 bit digital audio.


Lower the Latency setting
I suggest that you lower the Latency value in small steps. After each change, click the Stop & clear button on the main window a few times (not too quickly) and try playing a new note. When the sound starts breaking up, don't give up immediately. Close the I/O Control window (this reduces the number of active controls for the Mellosoftron to keep track of), click Stop & clear and try again. You may also want to shut down the Mellosoftron entirely and then restart it to get a guaranteed "clean slate" (don't worry, it remembers the Latency setting between runs).


Raise the Latency setting
I suggest that you raise the Latency value in small steps. After each change, click the Stop & clear button on the main window a few times (not too quickly) and try playing a new note. When the sound stops breaking up, step back a tad or two, close the I/O Control window (this reduces the number of active controls for the Mellosoftron to keep track of), click Stop & clear and try again. You may also want to shut down the Mellosoftron entirely and then restart it to get a guaranteed "clean slate" (don't worry, the Mellosoftron remembers the Latency setting between runs).


How to REGISTER

The Mellosoftron Evaluation Package is being distributed as shareware. This allows you to try it out for a reasonable amount of time before you decide to purchase a user license.

In order to give you full control over what you buy, I have kept Mellosoftron registration separate from the purchase of a sound library. You can order the Compact GM Library together with the Mellosoftron (and save on Shipping & Handling - you don't pay it twice), but I won't push it on you. After all, you may want to use the program with your own patch set, or you may already be using the Compact GM Library with the MIDInight Express.

The Mellosoftron is only $10 US + Shipping & Handling!

The details are the same as when ordering the Compact GM Library. In order to keep S&H as low as possible, I've arranged for electronic delivery (over the Web or by e-mail, though you can also have a disk sent to you by snail mail) and signed up with Kagi, the least expensive payment processing firm which I've been able to find.

Click here to order the Mellosoftron!

If Windows Help complains about not being able to find Register.EXE, you can launch it from the Program Manager (click the ugly icon labeled "Kagi order").


Time limiting
As explained in the About box, the Mellosoftron Evaluation Package gives you five trial runs with full capabilities. Therafter, the available note range is narrowed down, first to what you can see in the Keyboard window, then further by two semitones each time you restart the program. This gives you 37 more runs before the entire keyboard is disabled. All other features remain available at all times, even after the keyboard has stopped working.


Mellosoftron delivery

The following delivery methods are supported:

•	WWW: you will receive a URL, a personal username and a password, allowing you to download the licensed executable directly onto your hard drive. This is the preferred method. $5 US S&H, for a total of $15 US. Add  a contribution between $10 and $20 (whatever you feel like) to also get the Compact GM Library.

•	E-mail: you will be e-mailed the licensed executable as a UU- or MIME-encoded file (PLEASE STATE WHICH ONE YOU PREFER). S&H is $7 US, for a total of $17 US. Add  a contribution between $10 and $20 (whatever you feel like) to also get the Compact GM Library.

•	Snail mail: you will be air-mailed the licensed executable on a standard, 3.5" diskette (surface delivery is just too slow, especially outside of Europe). S&H is $10 US, for a total of $20 US. Add  a contribution between $10 and $20 (whatever you feel like) to also get the Compact GM Library.


License information

Last updated: July 3, 1996.

This file contains important license information regarding the distribution and use of the Mellosoftron.

The Mellsoftron is NOT in the public domain. It is Copyright (C) Tommy Anderberg, 1996. All rights reserved worldwide. This software and all the accompanying data and documentation files are protected by national and European laws and by International Treaty provisions. You must treat the Mellosoftron like any other copyrighted material, except that you may copy the Mellosoftron Evaluation Package and give to others (subject to the limitations outlined below). Any use or distribution of this software, data and documentation in violation of Copyright law or of the terms outlined in this document will be prosecuted to the best of our ability.

The conditions under which you may copy and distribute the Mellosoftron are described below under Limited Distribution License Agreement.

The conditions under which you may use the Mellosoftron are described below under Limited User License Agreement.

All rights not expressly granted here are reserved to Tommy Anderberg.

Limited Distribution License Agreement

This Limited Distribution License Agreement (throughout this section, the "Agreement") is a legal agreement between you, the distributor, and Tommy  Anderberg. By copying any part of the Mellosoftron, you are agreeing to be bound by  the terms of this Agreement.

As the copyright and trademark holder for the Mellosoftron, Tommy Anderberg authorizes individuals and organizations to copy the files contained in the Mellosoftron Evaluation Package for their own use or for giving to others, ONLY when the following conditions are met:

•	The Mellosoftron Evaluation Package - including all related program, data and documentation files - may not be modified in any way and must be distributed together, as a complete package, without exception. You may not distribute corrupted or otherwise damaged files.

•	No price or other compensation may be charged for the Mellosoftron Evaluation Package. A reasonable distribution cost may be charged for the distribution media, shipping and handling. BBS systems may not charge beyond their normal rates for downloads of the Mellosoftron Evaluation Package.

•	The Mellosoftron is designed to be easily extended by the addition of instrument patches and samples. You may not, however, distribute an extended version of the Mellosoftron Evaluation Package without prior written permission from Tommy Anderberg.

•	Neither this Agreement nor any part or portion hereof shall be assigned or sublicensed, except as described herein. Should any provision of this Agreement be held to be void, invalid, unenforceable or illegal by a court, the validity and enforceability of the other provisions shall not be affected thereby. If any provision is determined to be unenforceable, you agree to a modification of such provision to provide for enforcement of the provision's intent, to the extent permitted by applicable law. Failure of a party to enforce any provision of this Agreement shall not constitute or be construed as a waiver of such provision or of the right to enforce such provision. If you fail to comply with any terms of this Agreement, your license is automatically terminated, and you may be prosecuted at any time under national and European laws and under International Treaty provisions.

•	You acknowledge that you have read this Agreement, you understand this agreement, and understand that by copying any part of the Mellosoftron, you agree to be bound by this Agreement's terms and conditions. You further agree that, except for written separate agreements between Tommy Anderberg and you, this Agreement is a complete and exclusive statement of your distribution rights. This agreement supersedes all prior oral agreements, proposals or understandings, and any other communications between Tommy Anderberg and you relating to the subject matter of this Agreement.

Limited User License Agreement

This Limited User License Agreement (throughout this section, the "Agreement") is a legal agreement between you, the user, and Tommy Anderberg. By installing the Mellosoftron, by loading or running any part of it, or by placing or copying any part of it onto your computer hard drive, you are agreeing to be bound by the terms of this Agreement.

For the purposes of this section, "use" means loading the software into RAM, as well as installation on a hard disk or other storage device.

 As the copyright and trademark holder for the Mellosoftron, Tommy Anderberg authorizes individuals or organizations to use the Mellosoftron, ONLY when the following conditions are met:

•	You shall not: modify, translate, disassemble, decompile or reverse engineer the compiled executables contained in the Mellosoftron.

•	You may not exploit running copies of the Mellosoftron commercially, e.g. by renting, leasing or selling access to a computer running the Mellosoftron.

•	You may not distribute or otherwise exploit the output produced by the Mellosoftron if you have not purchased your own personal copy of the Mellosoftron.

•	You are free to distribute and exploit the output produced by the Mellosoftron, provided that you have purchased a personal copy of the Mellsoftron, and that the output in question is not part of a competing product (e.g. a sound data base for use with the Mellosoftron, the MIDInight Express or WAVmaker, and hence in direct competition with the WAVmaker Registered Package), in which case you must have prior written permission from Tommy Anderberg.

•	The user accepts sole and full responsibility for any damage or loss arising from the use or the inability to use the Mellosoftron. While this software has been extensively tested and is believed to be safe, Tommy Anderberg disclaims any warranties, either expressed or implied, including but not limited to warranties of fitness for ANY particular purpose and of uninterrupted, error free operation. Under no circumstances shall Tommy Anderberg be liable for loss of data, loss of profits, lost savings, special, incidental, consequential, indirect or other similar damages arising from the use or the inability to use the Mellosoftron.

•	Neither this Agreement nor any part or portion hereof shall be assigned or sublicensed, except as described herein. Should any provision of this Agreement be held to be void, invalid, unenforceable or illegal by a court, the validity and enforceability of the other provisions shall not be affected thereby. If any provision is determined to be unenforceable, you agree to a modification of such provision to provide for enforcement of the provision's intent, to the extent permitted by applicable law. Failure of a party to enforce any provision of this Agreement shall not constitute or be construed as a waiver of such provision or of the right to enforce such provision. If you fail to comply with any terms of this Agreement, your license is automatically terminated, and you may be prosecuted at any time under national and European laws and under International Treaty provisions.

•	You acknowledge that you have read this Agreement, you understand this Agreement, and understand that by installing any part of the Mellosoftron, by loading or running any part of the Mellosoftron, or by placing or copying any part of the Mellosoftron onto your computer hard drive, you agree to be bound by this Agreement's terms and conditions. You further agree that, except for written separate agreements between Tommy Anderberg and you, this Agreement is a complete and exclusive statement of the rights and liabilities of the parties involved in the use of the Mellosoftron. This agreement supersedes all prior oral agreements, proposals or understandings, and any other communications between Tommy Anderberg and you relating to the subject matter of this Agreement.


How to get more sounds

The demo PRGs and WAVs contained in the Mellosoftron Evaluation Package are all part of the Compact GM Library, one of the two GM libraries currently (September 25, 1996) available for the WAVmaker software family.

•	The General MIDI library delivered with the WAVmaker Registered Package is shipped on a proprietary compressed format (DFT) and expands to 150 MB of 16 bit, 44100 Hz WAVs + all PRGs needed to render any GM file. It also contains several non-standard drum sets. This library is primarily intended for MID to WAV rendering, not for real time operation.

•	The Compact GM Library is the best choice for real time operation, in particular with the MIDInight Express, due to its smaller memory footprint. Since only a handful of sounds is common to the two packages, the Compact GM Library can also serve as an alternative to WAVmaker's GM library.

I will accept any contribution between $10 and $20 USD + Shipping & Handling in exchange for the Compact GM Library. If you're also ordering the Mellosoftron at the same time and using the same delivery method, Shipping & Handling is in common - you don't pay it twice. In case you're wondering, here's why I'm not asking for more.

In order to keep Shipping & Handling as low as possible, I've arranged for electronic delivery (over the Web or by e-mail, though you can also have disks sent to you by snail mail) and signed up with Kagi, the least expensive payment processing firm which I've been able to find.

Click here to order the Compact GM Library!

If Windows Help complains about not being able to find Register.EXE, you can launch it from the Program Manager (click the ugly icon labeled "Kagi order").


Why so cheap?!?
Unlike the sounds in the WAVmaker Registered Package, many of those contained in the Compact GM Library can also be found in freely available, alternate sound sets for various  wavetable cards (AWE32, GUS etc.). Therefore, I am not asking you to pay for the sounds themselves. I am however asking you for a contribution in exchange for the substantial amount of time which went into finding, selecting, converting and editing those sounds, as well as into creating the necessary PRGs for them.


Compact GM Library delivery

The following delivery methods are supported:

•	WWW: you will receive a URL, a personal username and a password, allowing you to download the Compact GM Library directly onto your hard drive. This is the preferred method. $5 US S&H (unless ordered with the Mellosoftron), for a total of $15-25 US, depending on your contribution.

•	E-mail: you will be e-mailed the Compact GM Library as a set of either UU- or MIME-encoded files. You need a fairly large mailbox for this to work - the larger the better, but handling even only one file at a time requires at least 2 MB of free storage space (encoding inflates the files quite a bit). Since coordinating such transfers usually takes some doing, S&H is $7 US (unless ordered with the Mellosoftron), for a total of $17-27 US, depending on your contribution.

•	Snail mail: you will be air-mailed the Compact GM Library on five standard, 3.5" diskettes (surface delivery is just too slow, especially outside of Europe). Pocket calculator in hand, I've determined that postage doesn't vary enough with the destination (relative to the total cost) to warrant the complication of charging recipients outside of Europe more than recipients within Europe. Therefore, no matter where you are, S&H is $10 US (unless ordered with the Mellosoftron), for a total of $20-30 US, depending on your contribution.


About Kagi

Kagi is a small company specialising in payment processing. It can handle Visa/MC, American Express, First Virtual, US checks, money orders, cash (most major currencies, not just US dollars) and invoices.

The people at Kagi set themselves apart from their competitors (at least all those known to me) by the lowest transaction fees in the market, which they achieve by automating most of the process. This in turn is made possible by Register, a simple program which helps you fill out a standardized order form. After completing the form, you send it to Kagi by e-mail, fax or snail-mail. Sensitive information such as credit card numbers is encoded for better security.

If Windows Help complains about not being able to find Register.EXE, you can launch it from the Program Manager (click the ugly icon labeled "Kagi order").


Contacting the author

At the time of writing, the best way to reach me is by e-mail to

Tommy.Anderberg@abc.se

Alternatively, send snail mail to

Tommy Anderberg

Almvagen 4

195 44 Marsta

Sweden


About WAVmaker

The best way to get up to date information about WAVmaker and related software is to visit WAVmaker's Home Page (http://www.abc.se/~m9303), where you can download the WAVmaker Evaluation Package, containing fully functional executables and online documentation.

At the time of writing (September 25, 1996) the latest version is 2.3 (September 15 build) available both for Windows 3.1 (16 bit executables) and Windows 95/NT (32 bit executables). Chances are that there will be a newer version by the time you read this.

WAVmaker features (yes, I know the screen shots below are taken under Windows 3.1 - I still think the old style windows and buttons look better!)...

•	Pro quality MID to WAV rendering. While the Mellosoftron and the MIDInight Express use fast but low-quality linear interpolation to change the pitch of library samples, WAVmaker implements sophisticated resampling algorithms minimizing aliasing and distortion effects, for crystal clear sound. It can also produce output in any combination of mono and stereo; 11025,  22050 and 44100 Hz; 8 and 16 bits (Mellosoftron and MIDInight are always 22050 Hz, 16 bit stereo).

•	A 150 MB General MIDI library with all necessary patches and samples (16 bit, 44100 Hz mono WAVs) to render any GM file, plus several non-standard drum sets.

•	A rich selection of WAV editing functions, including filters, ring modulator, echo, flange, chorus, several reverb algorithms, a fully programmable, 32 band Vocoder, and many, many others.

•	A proprietary sound compression/decompression system.

•	A textual song description language - edit songs using any text editor (or use the quick MIDI editing functions).

•	And much more!

Best of all, Standard Registration is only $40 + Shipping & Handling!


Pro quality MID to WAV rendering.


A rich selection of WAV editing functions


Vocoder


About the MIDInight Express

The MIDInight Express is a real time, wavetable MIDI player and MID to WAV renderer. "So what", you say? The point is that, just as with the Mellosoftron, you don't need a wavetable card to run it! Any cheap sound card capable of playing stereo, 16 bit digital audio at a rate of 22050 Hz (or higher) will do. And it's FREE!

A Compact GM Library developed specifically for the MIDInight Express (and ideal with the Mellosoftron) is also available.

You can use the MIDInight Express...

•	As a standalone General MIDI player

•	As a quick & dirty MID to WAV renderer

•	As a WAVmaker "pre-listener"

•	As a better WAV player

At the time of writing (September 25, 1996) the latest version is 1.3 (September 20 build), but chances are that it will have been superseded by the time you read this. Come visit the MIDInight Express Home Page at http://www.abc.se/~m9303/mn.html  for the latest executables and news.

Want to see what the MIDInight  Express looks like? Here is a screen shot of the marvel in action!


As a standalone General MIDI player
If you are tired of listening to your MIDs as rendered by the toy FM synth chips found on Sound Blasters and on other inexpensive sound cards, then this program is for you!

For best performance in standalone operation, I recommend the Compact GM Library. This will minimize memory and CPU usage.


As a quick & dirty MID to WAV renderer
Sometimes you need to create a song on WAV format for a Web page, a program, or a multimedia application.

The MIDInight Express offers the fastest route - just check the "Record to file" box on the main window and play the MID as usual! In most cases, the result will sound MUCH better than recording off your sound card while playing.

This function is also useful for listening to MIDs which are just too complicated for real time rendering on your current hardware (too little free RAM to hold all samples, causing the disk swapper to kick in, or too slow a CPU). Note that the MIDInight Express can play WAVs, too.

For CD quality MID to WAV rendering, check out WAVmaker.


As a WAVmaker "pre-listener"
Musicians and multimedia creators all over the world are using WAVmaker, its powerful MID and WAV editing functions, and its fully editable 150 MB library of General MIDI patches and 16 bit, 44.1 kHz samples to create top quality recordings of their music.

The MIDInight Express reads the same file formats, and can be used together with WAVmaker's library as a quick pre-listener to check levels and instrument choices. When you are satisfied with your arrangement, it's time to let WAVmaker take over and create a CD quality song.


As a better WAV player
An auxiliary function of the MIDInight Express is the ability to play WAV files using the standard Media Control Interface (MCI). On most systems, it will do a better job than the Windows 95 media player (which apparently tries to load the whole WAV before playing it, bringing the whole system to a virtual standstill when there isn't enough free RAM).


MIDInight screen shot